import Mock from "mockjs"
const api = [
    {
        url: "/staff/getStaffList",
        type: "get",
        response: (option) => {
            const data = Mock.mock({
                'list|10': [{
                    'name': '@cname',
                    'age|20-40': 20,
                    'sex|1': [1, 2],
                    'position|1': [1, 2, 3, 4],
                    'department|1': ['人力资源部', '财务部', '市场营销部', '技术部'],
                    'id': '@id',
                    'hireDate|1577808000000-1679393225366': 1,
                    'phone': /1[3456789]\d{9}/,
                    'email': /\w{5,10}@(qq|163|gmail)\.com/,
                }],
                total: 654
            })
            return {
                code: 200,
                data,
                msg: "成功"
            }
        }
    },
    {
        url: "/staff/reviseStaff",
        type: "post",
        response: (option) => {
            return {
                code: 200,
                data: 1,
                msg: "成功"
            }
        }
    },
    {
        url: "/staff/delStaff",
        type: "post",
        response: (option) => {
            return {
                code: 200,
                data: 1,
                msg: "成功"
            }
        }
    }
]


export default api